package com.example.controlexercise;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import java.util.ArrayList;

public class setView extends AppCompatActivity {

    ArrayList<String> list = new ArrayList<>();
    private ListView listView_set;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_set_view);
        initView();
        setList();
    }

    public void initView(){
        listView_set = findViewById(R.id.setList);
        ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1,list);
        listView_set.setAdapter(arrayAdapter);
    }

    public void setList(){
        for (int i =0;i<100;i++){
            list.add("字体设置");
            list.add("存储设置");
            list.add("亮度设置");
        }

    }
}